package LeetCode;

public class LeetCodeMain30 {
    public int depth(String s){
        int max=0;        int count=0;        int length=s.length();        int i=0;        while (i{            max=Math.max(max,count);            if (s.charAt(i)=='('){                count++;            }else if (s.charAt(i)==')'){                count--;            }            i++;        }        return count;
    }
}
